<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="zh">
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<head>
    <base href="/">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no, shrink-to-fit=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="apple-mobile-web-app-capable" content="no"/>
    <meta name="format-detection" content="telephone=no">
    <title>支付结果</title>
    <script src="static/js/cssrem.js"></script>
    <link href="static/css/style.css" rel="stylesheet">
</head>

<body>
<script>
if (
  typeof test !== 'undefined' ||
  (typeof window.webkit !== 'undefined' && typeof window.webkit.messageHandlers.canJsGoBack !==
      'undefined')
) {
  document.write(
    '<header class="header"><div class="header-bg"></div><div class="titlet-bar white"><a class="btn-goback active dib"></a><div class="title ell g3">支付结果</div></div></header>'
  )
}else{
  document.write(
    '<header class="header dn"><div class="header-bg"></div><div class="titlet-bar white"><a class="btn-goback active dib"></a><div class="title ell g3">支付结果</div></div></header>'
  )
}
</script>
<div class="content bgwh">
    <div class="wrapper">
        <input type="hidden" value="${resultUrl }" id="resultUrl" />
        <input type="hidden" value="${lightPayUrl }" id="lightPayUrl" />
    </div>
</div>
<script src="//cdn.bootcss.com/babel-polyfill/6.23.0/polyfill.min.js"></script>
<link href="//cdn.bootcss.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet">
<script type="text/javascript" src="static/js/app.js"></script>
<script src="//cdn.bootcss.com/axios/0.16.2/axios.min.js"></script>
<script src="static/js/layer_mobile/layer.js"></script>
<script type="text/javascript">
confirm();
	function confirm(){
    	layer.open({
		    title: '支付提示',
		    content: '支付完成后，请根据您支付的情况点击下面按钮。',
		    btn: ['支付完成','返回收银台'],
		    shadeClose:false,
		    yes: function(index){
		        layer.close(index);
		        window.location.href=document.querySelector('#resultUrl').value;
		    },
		    no: function(index){
		        layer.close(index);
		        window.location.href=document.querySelector('#lightPayUrl').value;
		    }
		});	
		
	}
	
</script>

</body>
</html>
